package cn.dgfy.BaseSpringBootWebProj.mapper;

import cn.dgfy.BaseSpringBootWebProj.entity.Demo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DemoMapper {
	@Select("SELECT * FROM Demo")
	List<Demo> findAll();
	
	@Select("SELECT * FROM Demo WHERE id = #{id}")
	Demo findById(@Param("id") int id);
}
